<template>
  <div>
    <van-image :src="wxUserAvatarUrl" alt="头像" width="100" height="100" round lazy-load></van-image>
    <van-cell-group>
      <van-cell icon="comment" :title="wxUserEmail"></van-cell>
      <van-cell icon="label" :title="wxUserCode"></van-cell>
      <van-cell icon="manager" :title="wxUserNickName"></van-cell>
      <van-cell icon="eye" :title="wxUserSex"></van-cell>
      <van-cell icon="location" :title="wxUserAddress"></van-cell>
    </van-cell-group>
    <van-toast id="van-toast"></van-toast>
  </div>
</template>

<script>
  export default {
    name: 'my',
    data () {
      return {
        wxUserEmail: '',
        wxUserCode: '',
        wxUserNickName: '',
        wxUserSex: '',
        wxUserAddress: '',
        wxUserAvatarUrl: ''
      }
    },
    onShow () {
      var that = this
      var wxUser = wx.getStorageSync('wxUser')
      that.wxUserEmail = wxUser.wxUserEmail
      that.wxUserCode = wxUser.wxUserCode
      that.wxUserNickName = wxUser.wxUserNickName
      that.wxUserSex = wxUser.wxUserSex
      that.wxUserAddress = wxUser.wxUserCountry + ' ' + wxUser.wxUserCity + ' ' + wxUser.wxUserProvince
      that.wxUserAvatarUrl = wxUser.wxUserAvatarUrl
    }
  }
</script>

<style scoped>
</style>
